/*
* ============================================================================
*  Name     : GV60AppUi.h
*  Part of  : GV60
*  Copyright: Wipo Software
* ============================================================================
*/

#ifndef __GV60APPUI_H__
#define __GV60APPUI_H__

// INCLUDES
#include <aknviewappui.h>
#include <AknWaitDialog.h>
#include "GV60Config.h"
#include "VersionChecker.h"

// FORWARD DECLARATIONS
class CGV60PhonebookView;
class CGV60SettingsView;


class CGV60AppUi : public CAknViewAppUi, public MVersionCheckerObserver,
                   public MProgressDialogCallback
{
  public: // Constructors and destructor
    void ConstructL();
    virtual ~CGV60AppUi();

  private:  // Functions from base classes
    void HandleCommandL( TInt aCommand );
    void HandleStatusPaneSizeChange();
    void HandleResourceChangeL(TInt aType);
    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
  
  private:  // From MProgressDialogCallback
    void DialogDismissedL(TInt aButtonId);

  public: // From MVersionCheckerObserver
    void VersionReady(TInt iResult, TGV60Version iVersion);

  public:
    enum ENoteType
    {
      eNoteStandard,
      eNoteNoTimeout,
      eNoteBlockingStandard,
      eNoteBlockingNoTimeout
    };

  public: // New methods
    // Actions
    void                  CheckNewVersionL();
    void                  ShowVersionNumberL();
    CGV60Configuration&   GetConfig();

    // Notes
    void                  InformationNoteL(TInt aResourceId, ENoteType iType = eNoteStandard);
    void                  InformationNoteL(const TDesC& iText, ENoteType iType = eNoteStandard);
    void                  ErrorNoteL(TInt aResourceId, ENoteType iType = eNoteStandard);
    void                  ErrorNoteL(TInt aResourceId, TInt aCause, ENoteType iType = eNoteStandard);
    void                  ErrorNoteL(const TDesC& iText, ENoteType iType = eNoteStandard);
    void                  ConfirmationNoteL(TInt aResourceId);
    void                  ConfirmationNoteL(const TDesC& iText);
  
  private: // Data
    CGV60PhonebookView*   m_pPhonebookView;
    CGV60SettingsView*    m_pSettingsView;

    CAknWaitDialog*       m_pConnectingDialog;     // Waiting dialog for connection
    CAknWaitDialog*       m_pCheckVersionDialog;   // Waiting dialog during check version
    
    CGV60Configuration    m_iConfiguration;
    VersionChecker*       m_pVersionChecker;
};

#endif // __GV60APPUI_H__

// End of File
